﻿@page "/organizations/new"
@inject IHtmlLocalizer<EventHubResource> L
@using EventHub.Localization
@using EventHub.Organizations
@using Microsoft.AspNetCore.Mvc.Localization
@model EventHub.Web.Pages.Organizations.NewPageModel

@section scripts {
    <abp-script-bundle>
        <abp-script src="/Pages/Organizations/New.js"/>
    </abp-script-bundle>
}

<div class="container pt-4">
    <div class="row py-4">
        <div class="col-md-9 mx-auto profile-content">
            <div class="card">
                <div class="card-body" style="min-height: 496px">
                    <h3 class="mb-4">Create New Organization</h3>
                    <form method="post" enctype="multipart/form-data">
                        <div class="form">
                            <div class="row"> 
                                <div class="col-md-12">
                                    <h4 class="mb-4">Profile Image</h4>
                                    <div class="row">
                                        <div class="col-6">
                                            <div class="image-area">
                                                <img id="imageResult" src="#" alt="" class="img-fluid rounded shadow-sm mx-auto d-block">
                                            </div>
                                        </div>

                                        <div class="col-6">
                                            <div>
                                                <p class="mb-3">Photo size should be <span class="text-primary">1050x596</span> and <span class="text-primary">max @(OrganizationConsts.MaxProfilePictureFileSize / (1024 * 1024)) MB.</span></p>
                                                <input type="file" id="Organization_ProfilePictureFile" asp-for="Organization.ProfilePictureFile" class="form-control border-0" hidden>
                                                <label id="upload-label" for="Organization_ProfilePictureFile" class="btn btn-primary btn-lg text-white">Upload</label>
                                                <span asp-validation-for="Organization.ProfilePictureFile" class="text-danger"></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-md-6">
                                    <div class="form-label-group">
                                        <input type="text" id="inputName" asp-for="Organization.Name" class="form-control" placeholder="Name *" required="">
                                        <label for="inputName">Name*</label>
                                        <span asp-validation-for="Organization.Name" class="text-danger"></span>
                                    </div>
                                </div>

                                <div class="col-md-6">
                                    <div class="form-label-group">
                                        <input type="text" id="inputDisplayname" asp-for="Organization.DisplayName" class="form-control" placeholder="Display Name*" required="">
                                        <label for="inputDisplayname">Display Name*</label>
                                        <span asp-validation-for="Organization.DisplayName" class="text-danger"></span>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-label-group">
                                        <textarea rows="5" type="text" id="inputDescription" asp-for="Organization.Description" class="form-control" placeholder="Description*" required="" style="resize: none; "></textarea>
                                         <span asp-validation-for="Organization.Description" class="text-danger"></span>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-label-group">
                                        <input type="text" id="inputWebsite" class="form-control" asp-for="Organization.Website" placeholder="Website">
                                        <label for="inputWebsite">Website</label>
                                        <span asp-validation-for="Organization.Website" class="text-danger"></span>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-label-group">
                                        <input type="text" id="inputTwitterusername" asp-for="Organization.TwitterUsername" class="form-control" placeholder="Twitter Username">
                                        <label for="inputTwitterusername">Twitter Username</label>
                                        <span asp-validation-for="Organization.TwitterUsername" class="text-danger"></span>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-label-group">
                                        <input type="text" id="inputGitHubusername" asp-for="Organization.GitHubUsername" class="form-control" placeholder="GitHub Username">
                                        <label for="inputGitHubusername">GitHub Username</label>
                                        <span asp-validation-for="Organization.GitHubUsername" class="text-danger"></span>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-label-group">
                                        <input type="text" id="inputFacebookusername" asp-for="Organization.FacebookUsername" class="form-control" placeholder="Facebook Username">
                                        <label for="inputFacebookusername">Facebook Username</label>
                                        <span asp-validation-for="Organization.FacebookUsername" class="text-danger"></span>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-label-group">
                                        <input type="text" id="inputInstagramusername" asp-for="Organization.InstagramUsername" class="form-control" placeholder="Instagram Username">
                                        <label for="inputInstagramusername">Instagram Username</label>
                                        <span asp-validation-for="Organization.InstagramUsername" class="text-danger"></span>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-label-group">
                                        <input type="text" id="inputMediumusername" asp-for="Organization.MediumUsername" class="form-control" placeholder="Medium Username">
                                        <label for="inputMediumusername">Medium Username</label>
                                        <span asp-validation-for="Organization.MediumUsername" class="text-danger"></span>
                                    </div>
                                </div>
                                <div class="col-md-12 text-end">
                                    <button type="submit" class="btn btn-primary btn-lg">
                                        Create Organization
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>